package com.henu.yizhiya.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by y on 2017/5/17.
 */

public class RoomDbHelper extends SQLiteOpenHelper {
    //构造方法
    public RoomDbHelper(Context context) {
        super(context, "room.db", null, 1);
    }
    //建表方法
    @Override
    public void onCreate(SQLiteDatabase db) {
        String sql = "create table room (r_num varchar(10) primary key,week_1 varchar(10)," +
                "week_2 varchar(10)," +
                "week_3 varchar(10)," +
                "week_4 varchar(10)," +
                "week_5 varchar(10)," +
                "week_6 varchar(10)," +
                "week_7 varchar(10)," +
                "build_num varchar(10))";

        db.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    }
}
